##################################################################################################################################
# Promoting a Diverse Bench: An Analysis of Elite Messaging about Descriptive Representation      		                 #
# Jaclyn Kaslovsky (kjaclyn@wustl.edu), Albert H. Rivero (albert.rivero@virginia.edu), and Andrew R. Stone (arstone@olemiss.edu) #
# Washington University in St. Louis, University of Virginia, and University of Mississippi			                 #
# This version: June 2025, v. 1.0										                 #
# README File                                                                                      		                 #
##################################################################################################################################

This file outlines the software, code, and data used to produce the results presented in "Promoting a Diverse Bench: An Analysis of Elite Messaging about Descriptive Representation," by Jaclyn Kaslovsky, Albert H. Rivero, and Andrew R. Stone. To replicate all figures and tables from the main text, replicators should run "Analysis_Main Regressions.R". To replicate all figures and tables from the Appendix, replicators should run "Analysis_Appendix.R".

##########################################################################################
	## Scripts ##
##########################################################################################

	"Analysis_MainRegressions.R"
		runs descriptive statistics and regressions that appear in the main text

	"Analysis_Appendix.R"
		runs descriptive statistics and regressions that appear in the appendix

##########################################################################################	
	## Data ##
##########################################################################################

	"gender_press_releases.RData": press release-level data including all variables for gender analyses used for descriptives

	"race_press_releases.RData": press release-level data including all variables for race analyses used for descriptives

	"all_press_releases.RData": press release-level data used in Appendix.R for all nominees for additional exploration 

	"senator_level_data.RData": senator-level data used for analyses of senator messaging behavior

	"combined_ces.RData": respondent-level data used for analyses of the Cooperative Election Study

##########################################################################################	
	## Variables ##
##########################################################################################

	For descriptions of variables contained in the above datasets, please see the "Description of Variables" file.

##########################################################################################	
	## Software Dependencies ##
##########################################################################################	

	All analyses were undertaken in R version 4.4.1 on a system running macOS 15.3.1.

	attached base packages:
	[1] stats     graphics  grDevices utils     datasets  methods   base     

	other attached packages:
 	[1] margins_0.3.28            starpolishr_0.0.0.9007    lfe_3.0-0                 Matrix_1.7-0              quanteda.textmodels_0.9.9
 	[6] quanteda_4.1.0            tictoc_1.2.1              cowplot_1.1.3             broom_1.0.6               ggpubr_0.6.0             
	[11] scales_1.3.0              lubridate_1.9.3           forcats_1.0.0             stringr_1.5.1             dplyr_1.1.4              
	[16] purrr_1.0.2               readr_2.1.5               tidyr_1.3.1               tibble_3.2.1              ggplot2_3.5.1            
	[21] tidyverse_2.0.0           rms_6.8-2                 Hmisc_5.1-3               estimatr_1.0.4            stargazer_5.2.3          
	[26] xtable_1.8-4             

	loaded via a namespace (and not attached):
 	[1] tidyselect_1.2.1   fastmap_1.2.0      TH.data_1.1-2      prediction_0.3.18  digest_0.6.36      rpart_4.1.23       timechange_0.3.0  
 	[8] lifecycle_1.0.4    cluster_2.1.6      survival_3.6-4     magrittr_2.0.3     compiler_4.4.1     rlang_1.1.4        tools_4.4.1       
	[15] utf8_1.2.4         data.table_1.15.4  knitr_1.48         ggsignif_0.6.4     stopwords_2.3      htmlwidgets_1.6.4  LiblineaR_2.10-23 
	[22] multcomp_1.4-26    abind_1.4-8        polspline_1.1.25   withr_3.0.1        foreign_0.8-87     nnet_7.3-20        grid_4.4.1        
	[29] fansi_1.0.6        colorspace_2.1-1   iterators_1.0.14   MASS_7.3-60.2      cli_3.6.3          mvtnorm_1.3-1      rmarkdown_2.28    
	[36] generics_0.1.3     rstudioapi_0.16.0  tzdb_0.4.0         splines_4.4.1      parallel_4.4.1     base64enc_0.1-3    vctrs_0.6.5       
	[43] glmnet_4.1-8       sandwich_3.1-0     SparseM_1.84-2     carData_3.0-5      car_3.1-2          hms_1.1.3          rstatix_0.7.2     
	[50] Formula_1.2-5      htmlTable_2.4.3    foreach_1.5.2      glue_1.8.0         codetools_0.2-20   shape_1.4.6.1      stringi_1.8.4     
	[57] gtable_0.3.5       munsell_0.5.1      pillar_1.9.0       htmltools_0.5.8.1  quantreg_5.98      R6_2.5.1           evaluate_0.24.0   
	[64] lattice_0.22-6     backports_1.5.0    MatrixModels_0.5-3 Rcpp_1.0.13        fastmatch_1.1-4    gridExtra_2.3      nlme_3.1-164      
	[71] checkmate_2.3.2    xfun_0.52          zoo_1.8-12         pkgconfig_2.0.3 
